package com.mock.ems.redis;

import redis.clients.jedis.JedisPoolConfig;

public class RedisConfig {
	
	private String redisHost;
	private Integer redisPort;
	private String password;
	
	private String redisClusterNodes;
	
	public static RedisConfig build() {
		return new RedisConfig();
	}
	
	private JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
	
	public String getRedisHost() {
		return redisHost;
	}

	public RedisConfig redisHost(String redisHost) {
		this.redisHost = redisHost;
		return this;
	}

	public Integer getRedisPort() {
		return redisPort;
	}

	public RedisConfig redisPort(Integer redisPort) {
		this.redisPort = redisPort;
		return this;
	}

	public JedisPoolConfig getJedisPoolConfig() {
		return jedisPoolConfig;
	}

	public RedisConfig jedisPoolConfig(JedisPoolConfig jedisPoolConfig) {
		this.jedisPoolConfig = jedisPoolConfig;
		return this;
	}
	
	public RedisConfig clusterNodes(String nodesList) {
		this.redisClusterNodes = nodesList;
		return this;
	}
	
	public String getClusterNodes() {
		return this.redisClusterNodes;
	}

	public String getPassword() {
		return password;
	}

	public RedisConfig password(String password) {
		this.password = password;
		return this;
	}
}
